home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19971216-19980424 / 000212_news@newsmaster….columbia.edu _Wed Feb 11 13:58:28 1998.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id NAA06010
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Wed, 11 Feb 1998 13:58:23 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id NAA28907
  7.     for kermit.misc@watsun; Wed, 11 Feb 1998 13:58:22 -0500 (EST)
  8. Path: news.columbia.edu!panix!news.eecs.umich.edu!nntprelay.mathworks.com!cam-news-hub1.bbnplanet.com!boston-news-feed1.bbnplanet.com!news.bbnplanet.com!duck.Fluent.COM!not-for-mail
  9. From: John Stoffel <jfs@fluent.com>
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Making kermit 6.0 hangup network dials properly
  12. Date: 11 Feb 1998 13:50:39 -0500
  13. Organization: Fluent Inc., Lebanon NH
  14. Lines: 80
  15. Message-ID: <rm4t26x9fk.fsf@fluent.com>
  16. NNTP-Posting-Host: jfs.fluent.com
  17. X-Newsreader: Gnus v5.4.66/Emacs 19.34
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:8398
  19.  
  20. I've got a script I've written to send data to a bank.  It's pretty
  21. simple and does the job of sending a file to a remote site.  But I
  22. can't get it to quit or close the session properly.  Yes, I did buy
  23. the Kermit book, but it hasn't been helpful.  Probably because I
  24. haven't read it cover to cover, but I haven't had the time.
  25.  
  26. Here's the script I'm running.  I know it's a hack since I first wrote
  27. it from the examples in the source and from reading the man page and
  28. other docs.  The book shows me the much better ways to do this, but
  29. alas, time is short.
  30.  
  31. The message I get at the end is:  
  32.  
  33.     A network connection to grumpy:2004 might still be active.
  34.     OK to exit? 
  35.  
  36. And I really just want the script to hangup and exit without any
  37. prompts.  
  38.  
  39.     ; Kermit 6.02 script for sending direct deposit info to the bank.
  40.     ; written by JFS - 1/15/1998 version 1.0 ; todo set it up so we can
  41.     ; try multiple grumpy ports
  42.     ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  43.  
  44.     set input case ignore
  45.     set input echo on
  46.  
  47.     ; check we're running this on mtw
  48.     xif not equal "\v(host)" "mtw" { echo, echo You must run this on the host MTW, echo,  quit 0 }
  49.  
  50.     ; We're going to use grumpy's modems to make the connection
  51.     set network TCP/IP
  52.     set host grumpy 2004
  53.     xif NOT SUCCESS { quit }
  54.     set modem type microcom-at-mode
  55.  
  56.     input 4 Username: 
  57.     output FOO\13
  58.     input 2 Password: 
  59.     output FOO\13
  60.  
  61.     minput 2 {Password OK} {% Access denied}
  62.     xif SUCCESS {echo, echo "found grumpy", echo} else {hangup, quit 0}
  63.     pause 5
  64.  
  65.     xif = 1 \v(minput) { echo, echo Password OK, echo }
  66.     xif = 2 \v(minput) { echo Access denied by grumpy, hangup, quit 0 }
  67.  
  68.     ; now dial the bank
  69.     dial 1-xxx-xxx-xxxx
  70.     xif SUCCESS { echo, echo sending file now, echo }
  71.  
  72.     for \%i 1 3 1 {            ; Try 3 times to get prompt
  73.         output \13             ; Send <CR>
  74.         reinput 5 ONLYC            ; Wait for "CCC..."
  75.         if success break
  76.     }
  77.     xif fail { echo Failed to get ECHOC..., quit 0 }
  78.  
  79.     send tape
  80.     xif SUCCESS { echo, echo File is sent, echo }
  81.  
  82.     ; why doesn't this work?
  83.     hangup
  84.     hangup
  85.     exit
  86.         
  87.  
  88. Does anyone have a solution to this?  Even just a page number would
  89. help.  Thanks.
  90.  
  91. John
  92.  
  93.      John Stoffel - Senior Unix Systems Administrator - Fluent, Inc.
  94.         jfs@fluent.com - http://www.fluent.com - 603-643-2600 x341
  95.              Geological time is not money.  - Mark Twain